//
//  MineHeaderView.m
//  News
//
//  Created by weige on 16/6/13.
//  Copyright © 2016年 weige. All rights reserved.
//

#import "MineHeaderView.h"
#import "SetingViewViewController.h"
@interface MineHeaderView()
{
    UIImageView *icoImage;
    UILabel *phone;
    
}
@end

@implementation MineHeaderView
@synthesize setBtn;
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createUI];
    }
    return self;
}

-(void)createUI
{
    icoImage=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"v2_my_avatar"]];
    icoImage.contentMode=UIViewContentModeCenter;
    [self addSubview:icoImage];
    self.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"v2_my_avatar_bg"]];
    setBtn=[UIButton  buttonWithType:UIButtonTypeCustom];
    [setBtn setBackgroundImage:[UIImage imageNamed: @"v2_my_settings_icon"] forState:UIControlStateNormal];
   
    [self addSubview:setBtn];
}



-(void)layoutSubviews
{
    icoImage.frame=CGRectMake((SCREEN_WIDTH-icoImage.frame.size.width)/2, 25, icoImage.frame.size.width, icoImage.frame.size.height);
    setBtn.frame=CGRectMake(SCREEN_WIDTH-47, 30, 35, 35);
}

@end
